package com.jghiof.face_recognition.FaceDatabase;


import com.jghiof.face_recognition.auth.AuthService;
import com.jghiof.face_recognition.util.GsonUtils;
import com.jghiof.face_recognition.util.HttpUtil;
import com.baidu.aip.face.AipFace;

import java.util.*;

/**
 * 人脸注册
 */
public class FaceAdd {

    /**
    * 重要提示代码中所需工具类
    * FileUtil,Base64Util,HttpUtil,GsonUtils请从
    * https://ai.baidu.com/file/658A35ABAB2D404FBF903F64D47C1F72
    * https://ai.baidu.com/file/C8D81F3301E24D2892968F09AE1AD6E2
    * https://ai.baidu.com/file/544D677F5D4E4F17B4122FBD60DB82B3
    * https://ai.baidu.com/file/470B3ACCA3FE43788B5A963BF0B625F3
    * 下载
    */
    public static String add() {
        // 请求url
        String url = "https://aip.baidubce.com/rest/2.0/face/v3/faceset/user/add";
        try {
            Map<String, Object> map = new HashMap<>();
//            map.put("image","http://5b0988e595225.cdn.sohucs.com/images/20180604/cf9acd5afbe147c2957bf1d5989335d6.jpeg");
            map.put("image","/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAFIASwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAA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i6uMTRvjqCDWz2FZWsnbaq4/hYfrSY0VIRuAPY1dQYAFUIGyo55q9HxUlE4Ap461GMYqTJNAmOwMUY9aQcHml4+lAgIBNNKe9OA9KQfWgdyLyzmjYO45qcYprRqT1oC5Du6c0E8VCH4FKXzQA/PNNPWm55o3UwFJppoPWkz3oAMdaZjvT+1GOKQwVueamU1BtyMU5SV4NAiwOadnimKcininYB496cDxTBTxRYQ6mkU4UoHFOwEckSTxmORcqRXPXEDWsrRv0/hPqK6Tofaq+oWQu7cgAeaoyjHtUtDi7HKXLERsfQVieFrdr3xq0odgsCMx29D2wa0dTmNtbTBxh1GCPSpvh3ZOVvdRccTMI0PsOv60RRo3od4o9qfnApoGKSVsAD1q0YjSSxp232pEwKkyKAExxTW+70708tTGPBHvQAHpWbqo3WE3GcDNaBOF5rO1NgthOxPBGKTGjMtVIUZrQj6VmW2cLk9q0oQTzipLLAPNSA8VEBUgPGKBEgFIRzz0oBpTzxQK4wvg4A5oB9aXYATx+NJtNAxdwo3ntTcEUmPx+lICgG5p4PFFFUAbj1oDZPNFFADs80nvRRQIMGlFFFIBwoIzRRQAqsVNTqQR1ooqkDHinDI60UUEjx6076UUUAKRSjpiiigDhfH2nzG1F1bAEMwWQd8k4BrqPD+nppmj21qmTsUE7uuTyaKKZV9DV6VEx3P7CiihCFXpS5oooEH40Hp+NFFADXPGKy9aA/s11Pcj+dFFJlIybZv3YAOCO1asTggfSiioZROrZpwcHoaKKExEwIpRRRTEKRS4oooANoxTdvtRRQB//2Q==");
            map.put("group_id", "test_1");
            map.put("user_id", "05313");
            map.put("user_info", "花花");
//            map.put("liveness_control", "NORMAL");
//            map.put("image_type", "URL");
//            AipFace face = new AipFace("24247698","0ZydKFm1FDhnXZQ1XyDtdy5I","5RGqUQnHlhSG4pFAGsids7lDcIk6lF3B");
            map.put("image_type","BASE64");
//            map.put("quality_control", "LOW");

            String param = GsonUtils.toJson(map);

            // 注意这里仅为了简化编码每一次请求都去获取access_token，线上环境access_token有过期时间， 客户端可自行缓存，过期后重新获取。
            String accessToken = AuthService.getAuth();

            String result = HttpUtil.post(url, accessToken, "application/json", param);
            System.out.println(result);
            return result;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    public static void main(String[] args) {
        FaceAdd.add();
    }
}